<template>
<div>
  <h3>{{msg}}</h3>
  <table border="1" width="100%">
    <tr>
      <td>编号</td>
      <td>姓名</td>
      <td>年龄</td>
      <td>邮箱</td>
      <td>城市</td>
      <td>电话号码</td>
      <td>手机号码</td>
      <td>操作</td>
    </tr>
    <tr v-for="(per,idx) in persons" :key="per.pid">
      <td>{{per.pid}}</td>
      <td>{{per.pname}}</td>
      <td>{{ per.age }}</td>
      <td>{{ per.email }}</td>
      <td>{{ per.city }}</td>
      <td>{{per.mobile}}</td>
      <td>{{per.telphone}}</td>
      <td>删除|修改</td>
    </tr>
  </table>
</div>
</template>

<script>
export default {
  name: "person",
  data(){
    return{
      msg:"员工列表",
      persons:[],
      person:{}
    }
  },
  created() {
    console.log("in created...");
    this.queryall();
  },
  methods:{
    queryall(){
      this.persons = [
        {pid:1,pname:"试试",age:18,email:"ss@qq.com",city:"北京",mobile:1111,telphone:55555555},
        {pid:2,pname:"芭比",age:20,email:"ss@qq.com",city:"上海",mobile:2222,telphone:66666666}
      ]
    }
  }
}
</script>

<style scoped>

</style>
